package javalight.network.ro.server;

import java.io.IOException;
import java.nio.BufferUnderflowException;
import java.nio.channels.ClosedChannelException;

import org.xsocket.MaxReadSizeExceededException;
import org.xsocket.connection.IDataHandler;
import org.xsocket.connection.INonBlockingConnection;

public class DefaultDataHandler implements IDataHandler
{

	ConnectionDispatcher dispatcher = new ConnectionDispatcher(1024*10);
	
	@Override
	public boolean onData(INonBlockingConnection connection) throws IOException, BufferUnderflowException, ClosedChannelException, MaxReadSizeExceededException {
		dispatcher.dispatchData(connection);
		return false;
	}
	
}
